<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>test_100_are_unique (SM_util_test)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File test/sm_util_test.rb, line 25</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_100_are_unique</span>
    <span class="ruby-identifier">uuids</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
    <span class="ruby-value">100</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
      <span class="ruby-identifier">uuids</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">SM_util</span>.<span class="ruby-identifier">gen_uuid</span>
    <span class="ruby-keyword kw">end</span>
    <span class="ruby-identifier">i</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">uuids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">u</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">i</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
      <span class="ruby-comment cmt">#printf(&quot;%d - %s\n&quot;, i, u)</span>
      <span class="ruby-comment cmt">#puts (i+=1).to_s</span>
      <span class="ruby-identifier">assert_false</span>(<span class="ruby-identifier">u</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">SM_util</span>.<span class="ruby-identifier">gen_uuid</span>),<span class="ruby-value str">&quot;Found a duplicate UUID!&quot;</span>)
    <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
